package com.test.springframework.app;

import com.test.springframework.app.bean.Person;
import com.test.springframework.app.config.BeanConfig;
import com.test.springframework.app.retry.RemoteService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @create 2020-05-21 10:29
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(BeanConfig.class);
        Person bean = context.getBean(Person.class);
        System.out.println(bean);

        final RemoteService bean1 = context.getBean(RemoteService.class);
        bean1.call();
    }
}
